home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 3 / Windows 6-Pak (InfoMagic) (Disc 3) (1999).ISO / Web-Server-Components / aexec15i.zip / activeexec.js < prev    next >
Text File  |  1998-11-01  |  948b  |  32 lines

  1. // ActiveExec.js 1.5
  2. // (c) 1998, Activity Software
  3. //
  4. // This is an example of using ActiveExec within Windows Scripting
  5. // Host.  It also serves to show how to implement ActiveExec.DLL in
  6. // JScript.
  7. //
  8. // This example assumes installation of ActiveExec and assumes WindowsNT is 
  9. // installed in the C:\WINNT directory.  If this is not true, change the 
  10. // CommandLine variable to the correct path.
  11. //
  12. // Requires: ActiveExec.DLL, Windows Scripting Host
  13. //
  14. // To execute: CSCRIPT.EXE ACTIVEExec.JS
  15.  
  16. // Create an instance of the ActiveExec object
  17. proc=WScript.CreateObject("ActiveExec.Process");
  18.  
  19. CommandLine = "c:\\winnt\\system32\\ping.exe www.activitysoft.com";
  20.  
  21. // Execute the command stored in the CommandLine variable
  22. proc.Execute(CommandLine);
  23.  
  24. // Display the returncode of the application
  25. WScript.Echo(proc.ReturnCode);
  26.  
  27. // Display the text output by the call to PING.EXE
  28. WScript.Echo(proc.OutputStream);
  29.  
  30.  
  31.  
  32.